package com.itheima.day4.Test1;

public class Breeder {
    public void breed(Animal a){
        a.drink();
        a.eat();
        /*if(a instanceof Dog){
            Dog dog=(Dog)a;
            dog.swimming();
        }
        if(a instanceof Sheep){
            Sheep sheep=(Sheep) a;
        }
        if(a instanceof Frog){
            Frog frog=(Frog) a;
            frog.swimming();
        }*/
        if(a instanceof SwimmingInter){
            SwimmingInter swimmingInter=(SwimmingInter)a;
            swimmingInter.swimming();
        }

    }
}
